﻿// infoDlg.cpp: 实现文件
//

#include "pch.h"
#include "MFCApplication_01.h"
#include "afxdialogex.h"
#include "infoDlg.h"


// infoDlg 对话框

IMPLEMENT_DYNAMIC(infoDlg, CDialogEx)

infoDlg::infoDlg(CWnd* pParent /*=nullptr*/)
	: CDialogEx(IDD_infoDlg, pParent)
	, m_type(_T(""))
	, m_model(_T(""))
	, m_frequency(0)
{

}

infoDlg::~infoDlg()
{

}

void infoDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialogEx::DoDataExchange(pDX);
	DDX_Text(pDX, IDC_EDIT1, m_type);
	DDX_Text(pDX, IDC_EDIT4, m_model);
	DDX_Text(pDX, IDC_EDIT5, m_frequency);
}


BEGIN_MESSAGE_MAP(infoDlg, CDialogEx)
	ON_BN_CLICKED(IDOK, &infoDlg::OnBnClickedOk)
	ON_BN_CLICKED(1, &infoDlg::OnBnClicked1)
	ON_BN_CLICKED(2, &infoDlg::OnBnClicked2)
END_MESSAGE_MAP()


// infoDlg 消息处理程序

void infoDlg::OnBnClickedOk()
{

}

void infoDlg::OnBnClicked1()
{
	// TODO: 在此添加控件通知处理程序代码
	UpdateData(TRUE);
	if (m_type == TEXT("") || m_model == TEXT(""))
	{
		MessageBox(TEXT("您有输入为空！"), TEXT("提示"));
		return;
	}

	if (m_frequency < 0 || m_frequency > 100000)
	{
		MessageBox(TEXT("您的成绩输入有误!"), TEXT("提示"));
		return;
	}
	CDialogEx::OnOK();
}

void infoDlg::OnBnClicked2()
{
	// TODO: 在此添加控件通知处理程序代码
}
